<template>
  <view>
    <view class="search-container" :style="{'background-color': bkgColor}" @click="gotoSearch">
      <view class="search-box" :style="{'border-radius': bdRadius + 'rpx'}">
        <uni-icons type="search" size="17"></uni-icons>
        <text>搜索</text>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    props: {
      bkgColor:{
        type: String,
        default: '#C00000'
      },
      bdRadius: {
        type: Number,
        default: 36
      }
    },
    data() {
      return {
        
      };
    },
    methods: {
      gotoSearch() {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
.search-container {
  height: 100rpx;
  // background-color: #C00000;
  padding: 0 20rpx;
  display: flex;
  align-items: center;
  .search-box {
    width: 100%;
    line-height: 72rpx;
    background-color: #fff;
    // border-radius: 36rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    text {}
  }
}
</style>